package inglar.autotc.shared;

/**
 * A collection of default values.
 * @author Lee
 */
public final class Values {

	public static final class ErrorCode {
		public static final String D000unimplemented = "ERROR D000: Feature unimplemented.";
		public static final String D001wbadargs = "ERROR D001 Bad -w arguments.";
		public static final String D002wbadjsessionid = "ERROR D002 Unauthorized session id.";
		public static final String D003ubadargs = "ERROR D003 Bad -u arguments.";
		public static final String D004wbadifconfig = "ERROR D004 Unable to retrieve device listing.";
		public static final String D005badlogin = "ERROR D005 Unable to log in user.";
		public static final String D006javahome404 = "ERROR D006: Unable to find environment variable JAVA_HOME.";
		public static final String D007notroot = "ERROR D007: You must be root to run this JAR file.";
		public static final String D008badgetscript = "ERROR D008: Unable to get device tc configuration data.";
		public static final String D009badsetscript = "ERROR D009: Unable to set device tc configuration data.";
		public static final String D010badnetstat = "ERROR D010: No data available from client.";
		public static final String D011noclients = "ERROR D011: No known clients available.";
		public static final String D012noactions = "ERROR D012: No known actions available.";
		
	}

	private Values() {
		/*
		 * DO NOT INSTANTIATE THIS CLASS.
		 */
	}
	
/* ========================================================================== */

	public static final String APP_VERSION = "0.0 beta";
	
	public static final String APP_NAME = "AutoTC";
	public static final String APP_AUTHOR = "Miguel Aguinaldo 2008-07612";
	
/* ========================================================================== */
	
	public static final String REGEX_IPv4 = "^(\\d{1,3}\\.){3}(\\d{1,3})$";
	
	public static final String REGEX_ALL_WHITESPACE = "\\s+"; 
	
/* ========================================================================== */
	
	public static final String ENVNAME_SYS_HOME_DIR = "AUTOTC_HOME";
	
	public static final String ENVNAME_JAVA_CLIENT_PORT = "clientport";
	
	public static final String ENVNAME_JAVA_DAEMON_PORT = "daemonport";
	
	public static final String ENVNAME_JAVA_DAEMON_DBHOST = "autotc.dbhost";
	
	public static final String ENVNAME_JAVA_DAEMON_DBPORT = "autotc.dbport";
	
	public static final String ENVNAME_JAVA_DAEMON_DBUSER = "autotc.dbuser";
	
	public static final String ENVNAME_JAVA_DAEMON_DBPASS = "autotc.dbpass";
	
/* ========================================================================== */
	
	public static final String CLIENT_DEFAULT_PORT = "19337";
	
	public static final String CLIENT_FILE_NAME = "autotc-client.jar";
	
	public static final String CLIENT_CMDHELP = 
			"Use: \n" +
			"java -jar JARFILE OPTIONS \n" +
			"JARFILE := this file \n" +
			"OPTIONS := { -start | -stop } ";
	
/* ========================================================================== */
	
	public static final String DAEMON_FILE_NAME = "autotc.jar";
	
	/**
	 * Used for jetty webapp loader
	 */
	public static final String DAEMON_DEFAULT_PORT = "19080";
	
	public static final String DAEMON_DEFAULT_DBHOST = "localhost";
	
	public static final String DAEMON_DEFAULT_DBPORT = "3306";
	
	public static final String DAEMON_DEFAULT_DBUSER = "root";
	
	public static final String DAEMON_DEFAULT_DBPASS = "password";
	
	public static final String DAEMON_LOADER_BADARGS = 
			"Use: \n" +
			"java -jar JARFILE OPTIONS \n" +
			"JARFILE := this jar file \n" + 
			"OPTIONS := { -start | -stop | -webapp [port_number] }";
	
/* ========================================================================== */
	
	public static final String FMT_TIMESTAMP = "yyyy.MM.dd-kk:mm.ss.SSS";
	
	/**
	 * The length of a logged user's idle time before the hook is freed, in milliseconds
	 */
	public static final long USER_TIMEOUT = 1000 * 60 * 30;

	public static final long DAEMON_TIMEOUT = 1000 * 3;
	

}
